<?php
/**
 * @author yaya
 * 移除成员事件
 */
class RemovedFromCluster {
	private $message = "";
	private $auth = null;
	private $cp = null;
	function RemovedFromCluster() {
		$this->auth = new Authority();
		$this->cp = new ClusterParam();
	}

	function run() {

		
			if ($this->auth->adminLevel > 1) {
				 $this->message = "主人，把索妮娅酱也带走把，索妮娅酱好怕怕、、555555555555555";
				 return;
			}

			$arr = array (
				'qq' => $_POST[Sender],
				'ClusterNum' => $_POST[ClusterNum],
				'flag' => 1,
				'day' => date("Y-m-d H:i:s", time() + 8 * 3600)
			);
			@ DB :: SaveTableRow('td_REMOVED_recode', $arr);
			$QUITFROMCLUSTER_MESS = $this->cp->getParamValue('QUITFROMCLUSTER_MESS');
			$this->message = preg_replace(array (
				"/\{0\}/",
				"/\{1\}/",
				"/\{2\}/",
				"/\{3\}/"
			), array (
				$_POST[Sender],
				$_POST[Nick],
				$_POST[ClusterName],
				$_POST[ClusterNum]
			), $QUITFROMCLUSTER_MESS);
		

	}
	
	private function __get($property_name) {
		return $this-> $property_name;
	}

	private function __set($property_name, $value) {
		$this->$property_name = $value;
	}
}
?>